<?php 
namespace app\manage\validate;
use think\Validate;

class Manage extends Validate
{
    protected $rule = [
        'manage_name'  =>  'require|max:25|unique:manage',
        'manage_pwd'  =>  'require',
        'manage_mobile'  =>  'regex:^1[34578]{1}\d{9}$|require',
        'manage_email'  =>  'email|require',
    ];

    protected $message  =   [
        'manage_name.require' => '请填写用户名！',
        'manage_name.max' => '用户名长度不得超过25位！',
        'manage_name.unique' => '用户名必须唯一！',
        'manage_pwd.require' => '请填写密码！',
        'manage_mobile.regex' => '手机号码不符合规范！',
        'manage_mobile.require' => '请填写手机号码！',
        'manage_email.email' => '邮箱不符合规范！',
        'manage_email.require' => '请填写邮箱地址！',
    ];

    protected $scene = [
        'edit'  =>  ['manage_name','manage_mobile','manage_email'],
    ];

}


 ?>